<template>
  <div>
    <el-button type="primary" icon="el-icon-back" circle @click="back()" />

    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="bubbling" name="bubbling">
        <Bubbling />
      </el-tab-pane>
      <el-tab-pane label="insert" name="insert">
        <Insert />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import Bubbling from '../components/structure/bubbling.vue'
import Insert from '../components/structure/insert.vue'
export default {
  name: "",
  components: {
    Bubbling,
    Insert,
  },
  data () {
    return {
      //初始化activeName
      activeName: "bubbling",
      buttonName: [
        {
          name: 'bubbling',
          value: 1
        },
        {
          name: 'insert',
          value: 2
        },

      ],
      showFlex: {
        flag: 1
      }
    }
  },
  // 
  mounted () {
    this.tableLocal()
  },
  methods: {
    back () {
      this.$router.go(-1)
    },
    // 切换tab时保存本地存储
    handleClick (tab) {
      // localStorage.setItem('task', tab.name)
    },
    // 调用当前本地存储的tab标签
    tableLocal () {
      // if (localStorage.getItem('task') != null) {
      //   this.activeName = localStorage.getItem('task')
      // }
    }
  },
}
</script>

<style lang="less" scoped>
.btons {
  display: flex;
  // flex-direction: ;
}
</style>
